import request from '@/utils/request'
import qs from "qs"
export default {
    //分页条件查询
    pageInfo(pageNum, pageSize, name, roleId) {
        var data = qs.stringify({ "pageNum": pageNum, "pageSize": pageSize, "name": name, "roleId": roleId })
        return request({
            url: '/api-goods/user/users',
            method: 'post',
            data
        })
    },
    //删除
    deleteById(id) {
        return request({
            url: `/api-goods/user/user/${id}`,
            method: 'delete'
        })
    },
    //修改
    updateById() {
        var data = qs.stringify({ "pageNum": pageNum, "pageSize": pageSize, "name": name, "roleId": roleId })
        return request({
            url: '/api-goods/user/users',
            method: 'post',
            data
        })
    },
    //新增
    add() {
        var data = qs.stringify({ "pageNum": pageNum, "pageSize": pageSize, "name": name, "roleId": roleId })
        return request({
            url: '/api-goods/user/users',
            method: 'post',
            data
        })
    }
}